//
//  SCPhotoTools.h
//  PhotoAlbum
//
//  Created by Chao Sheng on 2021/12/1.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface SCPhotoTools : NSObject

/// 通过颜色生成对应的图片线
+ (UIImage *)imageLineWithColor:(UIColor *)color;

/// 相册名称转换
+ (NSString *)transFormPhotoTitle:(NSString *)englishName;

/// 是否是刘海屏
+ (BOOL)deviceIsPhoneX;

/// 时间转换
+ (NSString *)transFromDateTime:(NSDate *)date;
/// 年月日
+ (NSString *)transFromYMDTime:(NSDate *)date;
/// 小时分
+ (NSString *)transFromMHTime:(NSDate *)date;

/// 是否为同一天
+ (BOOL)isSameDay:(NSDate*)date1 date2:(NSDate*)date2;


/// 通过asset获取image
/// @param asset PHAsset
/// @param size 尺寸
/// @param completion 完成后block
+ (void)getPhotoForPHAsset:(PHAsset*)asset size:(CGSize)size completion:(void (^)(UIImage *image,PHAsset *asset))completion;

//判断权限是否开启
+ (BOOL)requestAuthorization:(UIViewController*)vc type:(NSString*)type;

@end

NS_ASSUME_NONNULL_END
